package sort;

public class BubbleSort {

	public static int[] sort(int[] arr){

		int arrayLength = arr.length;
		int temp;

		for(int i = 0; i < arrayLength; i++){
			for(int j = arrayLength - 1; j > i; j--){
				if(arr[j] < arr[j-1]){
					temp = arr[j];
					arr[j] = arr[j-1];
					arr[j-1] = temp;
				}
			}
		}

		return arr;
	}
}
